/*
 * File:   EbookTest.h
 * Author: luis
 *
 * Created on 18-07-2013, 04:49:20 PM
 */

#ifndef EBOOKTEST_H
#define	EBOOKTEST_H

#include <cppunit/extensions/HelperMacros.h>

class EBookTest : public CPPUNIT_NS::TestFixture {
    CPPUNIT_TEST_SUITE(EBookTest);

    CPPUNIT_TEST(testTrimLine);
    CPPUNIT_TEST(testReadEBook);
    CPPUNIT_TEST(testReadEBookGivenANonExistentPath);
    CPPUNIT_TEST(testReadEBookGivenANull);
    
    CPPUNIT_TEST(testContainsWordGivenAWord);
    CPPUNIT_TEST(testContainsWordGivenAWordInsideAnotherWord);
    CPPUNIT_TEST(testContainsWordGivenAWordBetweenNumbers);
    CPPUNIT_TEST(testContainsWordGivenAWordBetweenTwoLines);
    CPPUNIT_TEST(testContainsWordGivenAWordInTheBeginOfTheLine);
    CPPUNIT_TEST(testContainsWordGivenAWordInTheEndOfTheLine);
    CPPUNIT_TEST(testContainsWordGivenANonExistentWord);
    
    CPPUNIT_TEST(testGenerateBackIndexBook);

    CPPUNIT_TEST_SUITE_END();

public:
    EBookTest();
    virtual ~EBookTest();
    void setUp();
    void tearDown();

private:
    
    void testTrimLine();
    
    void testReadEBook();
    void testReadEBookGivenANonExistentPath();
    void testReadEBookGivenANull();
    
    void testContainsWordGivenAWord();
    void testContainsWordGivenAWordInsideAnotherWord();
    void testContainsWordGivenAWordBetweenNumbers();
    void testContainsWordGivenAWordBetweenTwoLines();
    void testContainsWordGivenAWordInTheBeginOfTheLine();
    void testContainsWordGivenAWordInTheEndOfTheLine();
    void testContainsWordGivenANonExistentWord();
    
    void testGenerateBackIndexBook();
    
};

#endif	/* EBOOKTEST_H */

